const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/YGGLXT')
const userSchema = new mongoose.Schema({
	username:String,
	password:String
});
const typeSchema = new mongoose.Schema({
	department:String,
	profession:String,
	describe:String
});

const staffSchema = new mongoose.Schema({
	name:String,
	department:String,
	profession:String,
	sex:String,
	birthday:String,
	nativeplace:String,
	education:String,
	specialty:String,
	startwordtime:String,
	entercompanytime:String,
	professionaltitle:String,
	salary:Number,
	describe:String
});

const User = mongoose.model('user',userSchema);

const Type = mongoose.model('type',typeSchema);

const Staff = mongoose.model('staff',staffSchema);

module.exports={User,Type,Staff};
